import { createSlice } from "@reduxjs/toolkit";

interface menuState {
  collapsed: boolean;
}
const initialState: menuState = {
  collapsed: false,
}
export const menuSlice = createSlice({
  name: 'menu',
  initialState,
  reducers: {
    setCollapsed: (state, { payload }) => {
      state.collapsed = payload
    }
  },
})

export const { setCollapsed } = menuSlice.actions;
export default menuSlice.reducer;